package com.ubb.dbms.core.connection.result;

import org.json.simple.JSONObject;

public class MessageResult {

	public static final String MESSAGE_INFO = "INFO";
	public static final String MESSAGE_ERROR = "ERROR";
	private static JSONObject message = new JSONObject();

	public static JSONObject getMessage() {
		return message;
	}
	
	public static void setMessage(JSONObject message) {
		MessageResult.message = message;
	}
	
	public static void sendMessage(String type, String message) {
		JSONObject result = new JSONObject();
		result.put(type, message);
		MessageResult.setMessage(result);
	}
	
}
